package cn.yzfy.common.base.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serial;
import java.time.LocalDateTime;

/**
 * 基础输出对象带id、时间操作人字段 展示层
 *
 */
@NoArgsConstructor
@Getter public class BaseIdAndTimeAndOperationVO extends BaseIdAndTimeVO {
  
  @Serial
  private static final long serialVersionUID = -8243192684166209735L;
  
  public BaseIdAndTimeAndOperationVO(String createdBy, String updatedBy) {
    this.createdBy = createdBy;
    this.updatedBy = updatedBy;
  }
  
  public BaseIdAndTimeAndOperationVO(LocalDateTime createdTime, LocalDateTime updatedTime,
      String createdBy, String updatedBy) {
    super(createdTime, updatedTime);
    this.createdBy = createdBy;
    this.updatedBy = updatedBy;
  }
  
  public BaseIdAndTimeAndOperationVO(Long id, LocalDateTime createdTime,
      LocalDateTime updatedTime, String createdBy, String updatedBy) {
    super(id, createdTime, updatedTime);
    this.createdBy = createdBy;
    this.updatedBy = updatedBy;
  }
  
  /**
   * 创建时间
   */
  @Setter
  @Schema(description = "创建人", name = "createdBy", example = "144344665")
  private String createdBy;
  
  /**
   * 更新时间
   */
  @Setter
  @Schema(description = "更新人", name = "updatedBy", example = "153344665")
  private String updatedBy;
  
  // public void setCreatedBy(String createdBy) {
  //   this.createdBy = createdBy;
  // }
  
  // public void setUpdatedBy(String updatedBy) {
  //   this.updatedBy = updatedBy;
  // }
}